import FileOperRsVO from "../entity/file/response/FileOperRsVO" 


import RequestUtil from "./RequestUtil"
export const FileAPI={
//=================================[文件上传相关]=================================

/**临时文件临时状态转换为永久状态（前端无需主动调用，业务数据提交记录会自动持久化） */
trsfTmpFilesToPerManent:(parameters:String[])=>{
    return RequestUtil.executeRequestForResultObjectC<undefined>(
    {
        gatewayRoutePath:"file",
        methodType:"PUT",
        path:"/files-pestatus",
        parameterType:"List<String>:RequestBody",    //请使用此类型的实例（JSON）对象来传递参数
        resultObjectType:"ResultObjectC<?>",
        requestBody:true,
        innerClass:undefined
    },parameters)

},

/**单文件上传 */
fileUpload:(parameters:any)=>{
    return RequestUtil.executeRequestForResultObjectC<FileOperRsVO>(
    {
        gatewayRoutePath:"file",
        methodType:"POST",
        path:"/file",
        parameterType:"{file:MultipartFile,storageType:String} ",  //file:,storageType:存储模式 LOCAL:本地, ALI_OSS:阿里云存储 
        resultObjectType:"ResultObjectC<FileOperRsVO>",
        requestBody:false,
        innerClass:FileOperRsVO
    },parameters)

},

/**文件删除（前端无需主动调用，业务数据删除后端会自动删除图片） */
deleteImageByPath:(parameters:any)=>{
    return RequestUtil.executeRequestForResultObjectC<undefined>(
    {
        gatewayRoutePath:"file",
        methodType:"DELETE",
        path:"/file",
        parameterType:"{filePath:String} ",  //filePath:文件路径
        resultObjectType:"ResultObjectC<?>",
        requestBody:false,
        innerClass:undefined
    },parameters)

},

/**批量文件上传 */
filesUpload:(parameters:any)=>{
    return RequestUtil.executeRequestForList<FileOperRsVO>(
    {
        gatewayRoutePath:"file",
        methodType:"POST",
        path:"/files",
        parameterType:"{files:MultipartFile[],storageType:String} ",  //files:,storageType:存储模式 LOCAL:本地, ALI_OSS:阿里云存储 
        resultObjectType:"ResultObjectC<List<FileOperRsVO>>",
        requestBody:false,
        innerClass:FileOperRsVO
    },parameters)

},

/**文件批量删除（前端无需主动调用，业务数据删除后端会自动删除图片） */
deleteImagesByPath:(parameters:String[])=>{
    return RequestUtil.executeRequestForResultObjectC<undefined>(
    {
        gatewayRoutePath:"file",
        methodType:"PUT",
        path:"/files-discard",
        parameterType:"List<String>:RequestBody",    //请使用此类型的实例（JSON）对象来传递参数
        resultObjectType:"ResultObjectC<?>",
        requestBody:true,
        innerClass:undefined
    },parameters)

},

/**移动端批量文件上传(适配某些无法使用files作为name传批量图片的情况) */
filesUploadForApp:(parameters:any)=>{
    return RequestUtil.executeRequestForList<FileOperRsVO>(
    {
        gatewayRoutePath:"file",
        methodType:"POST",
        path:"/files/app",
        parameterType:"{request:MultipartRequest,storageType:String} ",  //request:,storageType:存储模式 LOCAL:本地, ALI_OSS:阿里云存储 
        resultObjectType:"ResultObjectC<List<FileOperRsVO>>",
        requestBody:false,
        innerClass:FileOperRsVO
    },parameters)

},











}